//
//  ILSettingItem.m
//  01-ItcastLottery
//
//  Created by apple on 13-12-23.
//  Copyright (c) 2013年 itcast. All rights reserved.
//

#import "ILSettingItem.h"

#define ILSettingColor(r,g,b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1.0]

@implementation ILSettingItem
+ (id)itemWithIcon:(NSString *)icon title:(NSString *)title
{
    ILSettingItem *item = [[self alloc] init];
    item.icon = icon;
    item.title = title;
    item.titleColor = [UIColor blackColor];
    item.subTitleColor = ILSettingColor(62, 58, 57);
    item.settingLabelColor = ILSettingColor(62, 58, 57);
    return item;
}

+ (id)itemWithTitle:(NSString *)title
{
    return [self itemWithIcon:nil title:title];
}


+ (id)itemWithIcon:(NSString *)icon title:(NSString *)title withOtherIcon: (NSString *)otherIcon
{
    ILSettingItem *item = [[self alloc] init];
    item.icon = icon;
    item.title = title;
    item.otherIcon = otherIcon;
    item.titleColor = [UIColor blackColor];
    item.subTitleColor = ILSettingColor(62, 58, 57);
    item.settingLabelColor = ILSettingColor(62, 58, 57);
    return item;
}

+ (id)itemWithTitle:(NSString *)title withOtherIcon: (NSString *)otherIcon{
    
    return [self itemWithIcon:nil title:title withOtherIcon:otherIcon];
}

- (void)setTitleColor:(UIColor *)titleColor{
    if (titleColor) {
        _titleColor = titleColor;
    }
}

- (void)setSubTitleColor:(UIColor *)subTitleColor {
    if (subTitleColor) {
        _subTitleColor = subTitleColor;
    }
}

- (void)setSettingLabelColor:(UIColor *)settingLabelColor {
    if (settingLabelColor) {
        _settingLabelColor = settingLabelColor;
    }
}

@end
